/*
 * floatstr.c (part of p8.c)
 *  
 *
 *  Created by Shang-Ju Chen on 3/5/11.
 *  checked on 2/7/11
 *
 */

void
floatstr( char *t )
{
	double x;

	if (!isdigit(*(t + strlen(t) - 1))
		{
		fprintf(fpe,e2,line,t);
		nerr++;
		lsymb = symbol[nsymb++] = 0;
		return;
		}
		
		x = atold(t);
		
		for (int i = 0; i < nrlit; i++)
		{
			if (x == rlit[i])
			{
				lsymb = symbol[nsymb++] = 200 + i;
				return;
			}
		}
		
		if(50 <= nrlit)
		{
			puts("** too many real literals **");
			exit(1);
		}
		
		rlit[nrlit++] = x;
		lsymb = symbol[nsymb++] = 199 + nrlit;
}
		
		
